import { http } from "@/utils/http";
import type { HttpResult } from "@/utils/http/types";

export function queryJobTable(params) {
  return http.request<HttpResult>("get", "/admin/job/get/table", {
    params: params
  });
}

export function queryJobList(params) {
  return http.request<HttpResult>("get", "/admin/job/get/list", {
    params: params
  });
}

export function addJob(params) {
  return http.request<HttpResult>("post", "/admin/job/insert", {
    data: params
  });
}

export function updateJob(params) {
  return http.request<HttpResult>("post", "/admin/job/update", {
    data: params
  });
}

export function deleteJob(ids) {
  return http.request<HttpResult>("post", `/admin/job/delete/${ids}`);
}

export function validJobCode(params) {
  return http.request<HttpResult>("get", "/admin/job/get/exists", {
    params: params
  });
}
